
import request from '@/config/axios'


export type FormVO = {
  id: number
  name: string
  conf: string
  fields: string
  status: number
  remark: string
  createTime: string
  type?:string
}
// 获得工作流的表单定义分页
// export const getFormPage = async (params) => {
//   return await request.get({
//     url: '/bpm/form/page',
//     params
//   })
// }
// /system/form-template/page
export const getFormPage = async (params) => {
  return await request.get({
    url: '/system/form-template/page',
    params
  })
}
// // 更新工作流的表单定义
export const updateForm = async (data: FormVO) => {
  return await request.put({
    url: '/system/form-template/update',
    data: data
  })
}
 // 创建工作流的表单定义
export const createForm = async (data: FormVO) => {
  return await request.post({
    url: '/system/form-template/create',
    data: data
  })
}
// 获得工作流的表单定义
export const getForm = async (id: number) => {
  return await request.get({
    url: '/system/form-template/get?id=' + id
  })
}
// 
// 删除工作流的表单定义
export const deleteForm = async (id: number) => {
  return await request.delete({
    url: '/system/form-template/delete?id=' + id
  })
}